package com.imti.mall.product.controller;

import com.imti.mall.common.Api.CommonResult;
import com.imti.mall.model.cms.pojo.CmsPrefrenceArea;
import com.imti.mall.product.service.CmsPrefrenceAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/v1/product")
public class CmsPrefrenceAreaController {

    @Autowired
    CmsPrefrenceAreaService cmsPrefrenceAreaService;

    /**
     * 查询优选专区表
     * @return
     */
    @GetMapping ("findCmsPrefrenceArea")
    public CommonResult findCmsPrefrenceArea(){
        List<CmsPrefrenceArea> list = cmsPrefrenceAreaService.findCmsPrefrenceArea();
        return  CommonResult.success(list);

    }
}
